package com.moinut.studentattendancemanager.model.dao.proxy;

import com.moinut.studentattendancemanager.model.dao.ICollegeDAO;
import com.moinut.studentattendancemanager.model.dao.impl.CollegeDAOImpl;

import java.util.List;

/**
 * @author MOILING
 */
public class CollegeDAOProxy extends BaseDAOProxy<CollegeDAOImpl> implements ICollegeDAO {
    @Override
    public List<String> getAllCollegeName() throws Exception {
        List<String> names = this.dao.getAllCollegeName();
        this.databaseConnection.close();
        return names;
    }

    @Override
    CollegeDAOImpl setDAOImpl() {
        return new CollegeDAOImpl(this.databaseConnection.getConnection());
    }
}
